package task3;

public class MyConnectionPoolApp {
	private static final  int CONNECTIONS_QUANTITY = 10;
	private static final int TASKS_QUANTITY = 20;

	public static void main(String[] args) {

		MyConnectionPool mcp = new MyConnectionPool("localhost",
				"User", "Pass", CONNECTIONS_QUANTITY);

		Thread[] tasks = new Thread[TASKS_QUANTITY];

		for (int i = 0; i < TASKS_QUANTITY; i++) {
			tasks[i] = new Thread(mcp.new MyTask(i + 1));
		}

		for (int i = 0; i < TASKS_QUANTITY; i++) {
			tasks[i].start();
		}
	}
}
